home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.lib;
-
- /**
- * Interactor predicate class that does an NOT operation across the results of
- * another interactor_pred objects it is composed out of.
- *
- * @see sub_arctic.lib.base_interactor#traverse_and_collect
- * @author Scott Hudson
- */
- public class pred_not implements interactor_pred {
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Component predicate. */
- protected interactor_pred _op1 = null;
-
- /**
- * Component predicate.
- * @return interactor_pred the predicate we are built from.
- */
- public interactor_pred op1() {return _op1;}
-
- /**
- * Set component predicate.
- * @param interactor_pred p the predicate we are to be built from.
- */
- public void set_op1(interactor_pred p) {_op1 = p;}
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Construct new predicate from another predicate
- * @param interactor_pred p the predicate we are to be built from.
- */
- public pred_not(interactor_pred p1)
- {
- set_op1(p1);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Perform the predicate test by inverting the result of the component
- * predicate.
- *
- * @param obj the interactor the predicate is testing.
- * @param parameters the additional parameters (of subclass specific type)
- * to the component predicate.
- * @return NOT of result from the component predicate.
- */
- public boolean test(interactor obj, Object parameters)
- {
- return !op1().test(obj, parameters);
- }
-
- //had:
- //* @exception sub_arctic.exception.bad_value thrown if the parameters
- //* parameter is not the proper type for the component predicate.
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-